package com.zlp.mall.portal.modules.ums.service;

import com.zlp.mall.portal.modules.ums.dto.req.MemberAddReq;
import com.zlp.mall.portal.modules.ums.dto.resp.MemberResp;
import com.zlp.mall.portal.modules.ums.model.Member;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zlp.mall.portal.security.dto.MemberDetails;
import org.springframework.security.core.userdetails.UserDetails;

/**
 * <p>
 * 会员表 服务类
 * </p>
 *
 * @author ZouLiPing
 * @since 2021-10-15
 */
public interface MemberService extends IService<Member> {

    /**
     * 用户注册
     *
     * @param memberAddReq
     * @date: 2021/10/15 10:37
     * @return: java.lang.Object
     */
    MemberResp register(MemberAddReq memberAddReq);


    /**
     * 登录
     *
     * @param username
     * @param password
     * @date: 2021/10/15 10:38
     * @return: com.zlp.mall.portal.modules.ums.dto.resp.MemberResp
     */
    Member login(String username, String password);

    /** 
     * 根据用户名获取用户信息
     * @param username
     * @date: 2021/10/15 10:49
     * @return: com.zlp.mall.portal.modules.ums.model.Member 
     */
    Member loadUserByUsername(String username);


    /**
     * 根据用户名获取会员信息
     * @param username
     * @date: 2021/10/15 10:49
     * @return: com.zlp.mall.portal.modules.ums.model.Member
     */
    MemberDetails loadMemberByUsername(String username);
}